package org.example.heterogeneous;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 元路径
 */
@Data
public class MetaPath {

    List<Node> metaPath;

    public MetaPath() {
        metaPath = new ArrayList<>();
    }

    private void addPath(Node node) {
        metaPath.add(node);
    }

    private void printMetaPath() {
        int size = metaPath.size();
        for (int i = 0; i < size; ++i) {
            Node node = metaPath.get(i);
            System.out.print(node.getContent());
            if (i != size - 1) {
                System.out.print(" -> ");
            } else {
                System.out.println();
            }
        }
    }

}
